package com.zy.listener;

import com.zy.constant.DirectConstant;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author xyz
 * 使用queuesToDeclare属性，如果不存在则会创建队列
 */
//@Component
//@RabbitListener(queuesToDeclare = @Queue(DirectConstant.QUEUE_A))
//public class DirectListener {
//
//    @RabbitHandler
//    public void consume(String msg) {
//        System.out.println("接受到新消息: " + msg);
//    }
//}
